<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>sdif2ad</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="UtilityConversion.html" title="File Conversion (HET_IMPORT, HET_EXPORT, PVLOOK, PV_EXPORT, PV_IMPORT, SDIF2AD, SRCONV)" />
    <link rel="prev" href="pv_import.html" title="pv_import" />
    <link rel="next" href="srconv.html" title="srconv" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">sdif2ad</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="pv_import.html">Prev</a> </td>
          <th width="60%" align="center">File Conversion (HET_IMPORT, HET_EXPORT, PVLOOK, PV_EXPORT, PV_IMPORT, SDIF2AD, SRCONV)</th>
          <td width="20%" align="right"> <a accesskey="n" href="srconv.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="sdif2ad"></a>
      <div class="titlepage"></div>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">sdif2ad</span>
        </h2>
        <p>sdif2ad — 
      Converts SDIF files to files usable by adsyn.
      <a id="IndexSdif2ad" class="indexterm"></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idp223152112"></a>
        <h2>Description</h2>
        <p>
      Convert files Sound Description Interchange Format (SDIF) to the
    format usable by Csound's <span class="emphasis"><em>adsyn</em></span> opcode. As of
    Csound version 4.10, <span class="emphasis"><em>sdif2ad</em></span> was available
    only as a standalone program for Windows console and DOS. 
    </p>
      </div>
      <div class="refsect1">
        <a id="idp223206928"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>sdif2ad</strong></span> [flags] infilename outfilename</pre>
      </div>
      <div class="refsect1">
        <a id="idp223209344"></a>
        <h2>Initialization</h2>
        <p>
      Flags:
      </p>
        <div class="itemizedlist">
          <ul class="itemizedlist" style="list-style-type: disc; ">
            <li class="listitem">
              <p><span class="emphasis"><em>-s</em></span>N -- apply amplitude
    scale factor N</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>-p</em></span>N -- keep only the
    first N partials. Limited to 1024 partials. The source partial
    track indices are used directly to select internal storage. As
    these can be arbitrary values, the maximum of 1024 partials may
    not be realized in all cases.</p>
            </li>
            <li class="listitem">
              <p><span class="emphasis"><em>-r</em></span> -- byte-reverse output
    file data. The byte-reverse option  is there to facilitate
    transfer across platforms, as Csound's <a class="link" href="hetro.html#HetroFileFormat" title="File Format"><em class="citetitle">adsyn</em></a> file
    format is not portable.</p>
            </li>
          </ul>
        </div>
        <p>
    </p>
        <p>
      If the filename passed to <a class="link" href="hetro.html" title="hetro"><em class="citetitle">hetro</em></a> has the
    extension <span class="quote">“<span class="quote">.sdif</span>”</span>, data will be written in SDIF
    format as 1TRC frames of additive synthesis data. The utility
    program <span class="emphasis"><em>sdif2ad</em></span> can be used to convert any
    SDIF file containing a stream of 1TRC data to the Csound <a class="link" href="hetro.html#HetroFileFormat" title="File Format"><em class="citetitle">adsyn</em></a>
    format. <span class="emphasis"><em>sdif2ad</em></span> allows the user to limit the
    number of partials retained, and to apply an amplitude scaling
    factor. This is often necessary, as the SDIF specification does
    not, as of the release of <span class="emphasis"><em>sdif2ad</em></span>, require
    amplitudes to be within a particular
    range. <span class="emphasis"><em>sdif2ad</em></span> reports information about the
    file to the console, including the frequency range. 
    </p>
        <p>
      The main advantages of SDIF over the <span class="emphasis"><em>adsyn</em></span>
    format, for Csound users, is that SDIF files are fully portable
    across platforms (data is <span class="quote">“<span class="quote">big-endian</span>”</span>), and do not
    have the duration limit of 32.76 seconds imposed by the 16 bit
    <span class="emphasis"><em>adsyn</em></span> format. This limit is necessarily
    imposed by <span class="emphasis"><em>sdif2ad</em></span>. Eventually, SDIF reading
    will be incorporated directly into <span class="emphasis"><em>adsyn</em></span>,
    thus enabling files of any length (subject to system memory
    limits) to be analysed and processed. 
    </p>
        <p>
      Users should remember that the SDIF formats are still under
    development. While the 1TRC format is now fairly well established,
    it can still change. 
    </p>
        <p>
      For detailed information on  the Sound Description Interchange
      Format, refer to the CNMAT website: 

      <a class="ulink" href="http://cnmat.CNMAT.Berkeley.EDU/SDIF" target="_top"><em class="citetitle">http://cnmat.CNMAT.Berkeley.EDU/SDIF</em></a>
    </p>
        <p>
      Some other SDIF resources (including a viewer) are available via
      the NC_DREAM website: 

      <a class="ulink" href="http://www.bath.ac.uk/~masjpf/NCD/dreamhome.html" target="_top"><em class="citetitle">http://www.bath.ac.uk/~masjpf/NCD/dreamhome.html</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idp223226224"></a>
        <h2>Credits</h2>
        <p>Author: Richard Dobson</p>
        <p>Somerset, England</p>
        <p>August, 2000</p>
        <p>New in Csound version 4.08</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="pv_import.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="UtilityConversion.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="srconv.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">pv_import </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> srconv</td>
        </tr>
      </table>
    </div>
  </body>
</html>
